package com.yuelao.yuelao_backend.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 群聊消息表
 */
@Data
@TableName("group_messages")
public class GroupMessage implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 群ID
     */
    private Long groupId;

    /**
     * 发送者ID
     */
    private Long senderId;

    /**
     * 消息类型: text, image, voice, video, file, location, system
     */
    private String messageType;

    /**
     * 消息内容
     */
    private String content;

    /**
     * 媒体文件URL
     */
    private String mediaUrl;

    /**
     * 是否撤回
     */
    private Boolean isRevoked;

    /**
     * 撤回时间
     */
    private LocalDateTime revokedAt;

    /**
     * 创建时间
     */
    private LocalDateTime createdAt;
}

